Optimal. Leaf size=25 \[ x-\frac{\log (2 \cos (c+d x)-\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0483056, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3531, 3530} \[ x-\frac{\log (2 \cos (c+d x)-\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3531
Rule 3530
Rubi steps
\begin{align*} \int \frac{3+\tan (c+d x)}{2-\tan (c+d x)} \, dx &=x-\int \frac{-1-2 \tan (c+d x)}{2-\tan (c+d x)} \, dx\\ &=x-\frac{\log (2 \cos (c+d x)-\sin (c+d x))}{d}\\ \end{align*}
Mathematica [B] time = 0.0416813, size = 62, normalized size = 2.48 \[ \frac{\tan ^{-1}(\tan (c+d x))}{d}+\frac{\log \left ((2-\tan (c+d x))^2-4 (2-\tan (c+d x))+5\right )}{2 d}-\frac{\log (2-\tan (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.024, size = 41, normalized size = 1.6 \begin{align*}{\frac{\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,d}}-{\frac{\ln \left ( -2+\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{dx+c}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.80106, size = 47, normalized size = 1.88 \begin{align*} \frac{2 \, d x + 2 \, c + \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 2 \, \log \left (\tan \left (d x + c\right ) - 2\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.64685, size = 109, normalized size = 4.36 \begin{align*} \frac{2 \, d x - \log \left (\frac{\tan \left (d x + c\right )^{2} - 4 \, \tan \left (d x + c\right ) + 4}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.406301, size = 39, normalized size = 1.56 \begin{align*} \begin{cases} x - \frac{\log{\left (\tan{\left (c + d x \right )} - 2 \right )}}{d} + \frac{\log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text{for}\: d \neq 0 \\\frac{x \left (\tan{\left (c \right )} + 3\right )}{2 - \tan{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20173, size = 49, normalized size = 1.96 \begin{align*} \frac{2 \, d x + 2 \, c + \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 2 \, \log \left ({\left | \tan \left (d x + c\right ) - 2 \right |}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]